package team.zero.lemon.module.workflow.service;

import org.springframework.stereotype.Service;
import team.zero.lemon.common.exception.CustomException;
import team.zero.lemon.common.service.CrudService;
import team.zero.lemon.module.workflow.dao.IFormDefinitionDataDao;
import team.zero.lemon.module.workflow.entity.FormDefinitionData;

/**
 * Created by Bo on 2016/11/16.
 */
@Service
public class FormDefinitionDataService extends CrudService<IFormDefinitionDataDao, FormDefinitionData> {

    public FormDefinitionData findByDefinitionId(Integer definitionId) {
        try {
            return dao.findByDefinitionId(definitionId).get(0);
        } catch (Exception ex) {
            return null;

        }
    }
}
